use std::collections::HashSet;

/**
 * 统计不重复元素个数，输⼊为逗号分隔的字符串
 * # Arguments
 * * `input_str` - 逗号分隔的字符串
 * # Returns
 * 不重复元素个数
 * # Examples
```
let c = solution1::count_distinct::new_count_distinct("1,爱,好,0,100,爱,1,物理,化学,物理,AI,AI");
assert_eq!(c, 8);
```
 */
pub fn new_count_distinct(input_str: &str) -> usize {
    let word_set: HashSet<_> = input_str.split(",").collect();
    word_set.len()
}
